package com.manli.api.base.datasource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynmicDataSource extends AbstractRoutingDataSource {  
	private Logger log = LoggerFactory.getLogger(DynmicDataSource.class); 
    /** 
     * 返回的内容是targetDataSources 的Key 
     */  
    @Override  
    protected Object determineCurrentLookupKey() {  
        return DynmicDataSourceContextHolder.getDataSourceKey();  
    }  
  
}  
